﻿using System;

namespace Lihong.CSharpStudy.FirstLession
{
    class Program
    {
        static void Main()
        {
            float x, y, z;

            Console.WriteLine("请输入第一条边的长度");
            string xs = Console.ReadLine(); //收到的数据是字符串
            x = float.Parse(xs);    //将字符串转换成float 
            //scanf("%f", &x);

            Console.WriteLine("请输入第二条边的长度");
            string ys = Console.ReadLine();
            y = float.Parse(ys);

            Console.WriteLine("请输入第三条边的长度");
            string zs = Console.ReadLine();
            z = float.Parse(zs);

            float zc = x + y + z;
            float zc2 = zc / 2;
            double mj = Math.Sqrt(zc2 * (zc2 - x) * (zc2 - y) * (zc2 - z));
            Console.WriteLine("面积是：" + mj);
        }
    }
}